Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Whales - Camila Tagle #110

Open
wants to merge 6 commits into
base: master
Choose a base branch
from
Open

Whales - Camila Tagle #110

wants to merge 6 commits into from

Conversation

mctagle
Copy link

@mctagle mctagle commented Mar 25, 2022

My ID name is Maria Camila Tagle Ossa, in case you have trouble finding it

@mctagle
Copy link
Author

mctagle commented Mar 28, 2022

Done

Copy link

@jericahuang jericahuang left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Excellent first project, Camila! You hit the learning goals and passed all the tests. 🙂🟢
You implemented every function according to the spec; I made notes in places where using a pre-written helper function could've saved some extra work and brain power. Nice job finishing out the tests as well. Keep up the great work!


# -----------------------------------------
# ------------- WAVE 3 --------------------
# -----------------------------------------

def get_unique_watched(user_data):
unique_watched = []
all_watched = set()

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great use of a set to capture unique watched!

def get_new_rec_by_genre(user_data):

rec_movies = get_available_recs(user_data)
genre = get_most_watched_genre(user_data)

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great use of helper functions!

Comment on lines +58 to +60
assert INTRIGUE_3 in friends_unique_movies
assert HORROR_1 in friends_unique_movies
assert FANTASY_4 in friends_unique_movies

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍🏻


#Assert

assert len(genre_recomend)==0

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍🏻

"genre": genre,
"rating": rating
}
if title is None or genre is None or rating is None:

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice! Usually this would be the first line of our function to check for any None attributes, and then create and return new_movie.


def get_most_watched_genre(user_data):
genre_count={}
if user_data["watched"] == []:

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great checking for the if user_data["watched"] == [] case in both this function and get_watched_avg_rating!

# -----------------------------------------
# ------------- WAVE 4 --------------------
# -----------------------------------------
def get_available_recs(user_data):

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice implementation; you could've also used get_friends_unique_watched as a helper function!

rec_movies_genre.append(movie)
return rec_movies_genre

def get_rec_from_favorites(user_data):

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice implementation; you could've also used get_unique_watched as a helper function!

genre_count[movie["genre"]]+=1
inverse = [(value, key) for key, value in genre_count.items()]
return max(inverse)[1]
# took this line from https://stackoverflow.com/questions/268272/getting-key-with-maximum-value-in-dictionary /

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for citing

@@ -1,23 +1,134 @@
# ------------- WAVE 1 --------------------
import pdb

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What was this module used for? Debugging?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants